<template>
  <!---->
  <div>
    <carousel :autoplaySpeed="autoplaySpeed" :Img="Img"></carousel>
    <v_menu :title="data.title" :site="data.list[activeIndex].list"></v_menu>

    <Row :gutter="16" class="wrapper">
      <i-col span="19" class="content">
        <div class="text">
          <h2>
            <p>{{content.title}}</p>
          </h2>
          <p>时间：{{content.createTimeFormate}}</p>
          <hr>
          <div class="textDetails">
            <p v-html="content1.newsContent"></p>
          </div>
        </div>
      </i-col>
      <i-col span="5" class="navigation">
        <ngn :data="data" :activeIndex="activeIndex"></ngn>
      </i-col>
    </Row>
  </div>
</template>

<script>
  import carousel from '../module/carousel'
  import ngn from '../module/ngn'
  import v_menu from '../module/menu'

  export default {
    components: {carousel, ngn, v_menu},
    data() {
      return {
        activeIndex: 4,
        autoplaySpeed: 100000,
        Img: [
          {
            id: 1,
            imageLocation: require('../../assets/img/u69.jpg'),
            state: true,
            uri: "",
          },
        ],
        data: {
          title: '关于机构',
          list: [
            {list: '机构介绍', link: 'organizationIntroduce'},
            {list: '专家顾问', link: '/consultants'},
            {list: '组织结构', link: '/organizationStructure'},
            {list: '联系方式', link: '/contactWay'},
            {list: '期刊加盟', link: '/journalsJoin'},
          ],
        },
        id: '',
        content: '',
        content1: '',
      }
    },
    mounted() {
      this.id = this.$route.query.id;
      this.activeIndex = this.$route.query.activeIndex;
      this.dataArray();
    },
    methods: {
      dataArray() {
        this.$axios.get(this.$api.url + '/news/new/' + this.id).then((res) => {
          if (res.data.code == 200) {
            this.content = res.data.data;
            this.content1 = res.data.data.newsDetail
          }
        });
      }
    }
  }
</script>

<style scoped>
  /*主要内容*/
  .wrapper .content {
    border-right: 1px solid #ccc;
    min-height: 300px;
  }

  .wrapper .navigation {
    padding-left: 0 !important;
  }

  .wrapper .content .text > h2 {
    font-style: normal;
    color: #6699CC;
    text-align: center;
    font-size: 24px;
    padding-top: 20px;
  }

  .wrapper .content .text > p {
    text-align: center;
    font-size: 16px;
    color: #999999;
    padding: 10px 0;
  }

  .wrapper .content .text .textDetails {
    padding: 10px 0 20px 0;
  }

  .wrapper .content .text .textDetails > p {
    padding: 10px 0;
    font-size: 16px;
    text-align: left;
    color: #000;
  }
</style>
